/**
 * @projectName study-note
 * @package Visitor
 * @className Visitor.Test
 */
package Visitor;

import java.util.concurrent.ConcurrentHashMap;

/**
 * Test
 * @description 测试类
 * @author answer_wx
 * @date 2022/7/6 16:57
 * @version 1.0
 */
public class Test {
    public static void main(String[] args) {
        ObjectStructure objectStructure = new ObjectStructure();
        objectStructure.attach(new ConcreteElementA("ConcreteElementA"));
        objectStructure.attach(new ConcreteElementB("ConcreteElementB"));
        ConcreteVisitorA concreteVisitorA = new ConcreteVisitorA("ConcreteVisitor01");
        ConcreteVisitorB concreteVisitorB = new ConcreteVisitorB("ConcreteVisitor02");
        objectStructure.accept(concreteVisitorA);
        objectStructure.accept(concreteVisitorB);
    }
}